package cn.doit.scala.day05.high_function

import scala.util.Random

/**
 * @DATE 2021/12/30/14:55
 * @Author MDK
 * @Version 2021.2.2
 * */
object C03_Match02 {
  def main(args: Array[String]): Unit = {
//    val e = 12
//    val e = "hello"
    val e = User(1,"lss",35)


    e match {
//      case x: Int => println("数字类型")
//      case x: String => println("字符串")
      case x: User => println(s"这是一个user类型 ${e.name}")
      case e: Student =>println("Student类型")
    }

  }
}
